# coding: utf-8
from sqlalchemy import Column, ForeignKey, UniqueConstraint
from sqlalchemy.dialects.mysql import INTEGER
from ..database import db,serialize

class RoleUser(db.Model):
    __tablename__ = 'role_users'
    role_id = Column(INTEGER, ForeignKey('roles.id'), primary_key=True, autoincrement=False)
    user_id = Column(INTEGER, ForeignKey('admins.id'), primary_key=True, autoincrement=False)
    # 联合唯一
    # UniqueConstraint('col1', 'col2', name='idx_col1_col2')
